-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
texinfo: fix build references when cross-compiling #178352
Conversation
The XS modules were being built for the build platform, and the perl scripts had build platform shebangs. It is possible to build the XS modules by passing PERL_EXT_CC=${stdenv.cc.targetPrefix}cc and --enable-perl-xs=yes, but they fail to load due to a handshake key mismatch. Instead, I just decided to disable the XS modules and use the pure Perl fallbacks when cross-compiling. The shebangs were fixed manually using substituteInPlace.
texinfo is a nativeBuildInput, but it is overridden in all-packages.nix, which breaks splicing. Therefore, buildPackages.texinfo needs to be used explicitly in the override. This wasn't actually causing any problems because texinfo's scripts were using build platform Perl shebangs. Once texinfo was fixed, gpm started failing to cross-compile.
@ofborg build pkgsCross.armv7l-hf-multiplatform.texinfoInteractive |
@@ -23224,7 +23224,7 @@ with pkgs; | |||
|
|||
# latest 6.8 mysteriously fails to parse '@headings single': | |||
# https://lists.gnu.org/archive/html/bug-texinfo/2021-09/msg00011.html | |||
texinfo = texinfo6_7; | |||
texinfo = buildPackages.texinfo6_7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why this is needed. gpm
seems to put texinfo
into nativeBuildInputs
. I would expect it to be enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description of changes
The XS modules were being built for the build platform, and the perl scripts had build platform shebangs.
It is possible to build the XS modules by passing
PERL_EXT_CC=${stdenv.cc.targetPrefix}cc --enable-perl-xs=yes
, but theyfail to load due to a handshake key mismatch. Instead, I just decided to disable the XS modules and use the pure Perl fallbacks when cross-compiling.
The shebangs were fixed manually using
substituteInPlace
.I also discovered that
gpm
was unintentionally relying on the incorrect shebangs, so I fixed that as well.Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes